﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace SudokuGame
{
    public class SudokuCell
    {
        private int i;
        private int j;
        private int value;
        private bool readOnly;

        public SudokuCell(int i, int j, int value, bool readOnly)
        {
            this.i = i;
            this.j = j;
            this.value = value;
            this.readOnly = readOnly;
        }

        public int I
        {
            get { return i; }
            set { i = value; }
        }

        public int J
        {
            get { return j; }
            set { j = value; }
        }

        public bool ReadOnly
        {
            get { return readOnly; }
            set { readOnly = value; }
        }

        public int Value
        {
            get { return this.value; }
            set
            {
                if (this.readOnly)
                { return; }
                this.value = value;
            }
        }
    }
}
